Image processing apparatus, image processing method, and storage medium

ABSTRACT

In image processing to improve visual recognizability of a captured image by reducing the influence of fine particles in the atmosphere, an image of higher image quality is obtained in which the influence of noise by an image sensor is suppressed. In an image processing apparatus that generates an image from a captured image, in which the influence of fine particles in the atmosphere has been reduced, pixel value of each pixel making up a scattered component enhanced image is determined based on lower pixel values except for the minimum pixel value within a predetermined block with a pixel of interest as a center in the captured image.

BACKGROUND OF THE INVENTION

Field of the Invention

The present invention relates to image processing to improve visual recognizability of a captured image by reducing the influence of fine particles in the atmosphere.

Description of the Related Art

In the field of a monitoring camera or the like, a reduction in visual recognizability due to fine particles (e.g., fog) present between a camera and a subject and a deterioration of image quality of a captured image have become problematic. As the cause of this, mention is made of scattering of light while traveling through the atmosphere. Then, it is known that there are two kinds of scattering of light due to fine particles in the atmosphere. One is Mie scattering, which occurs in the case where the diameter of a particle, such as trash, dust, and vapor, is great compared to the wavelength of light. In the case of the Mie scattering, light is scattered in white independently of the wavelength of the light and as a result of this, the farther a subject, the closer the color of the subject becomes white, and therefore, contrast is reduced. The other one is Rayleigh scattering, which occurs in the case where the diameter of a particle, such as an air molecule, is small compared to the wavelength of light. In the case of the Rayleigh scattering, the shorter the wavelength, the more scattering occurs. As a result of this, the farther a subject, the more the blue component is scattered, and therefore, the image becomes a bluish hue. The technique (haze removal technique) to remove a scattered light component from an image whose visual recognizability has been reduced due to occurrence of the above-described two kinds of scattering is proposed. In U.S. Pat. No. 8,340,461, the technique is disclosed which improves visual recognizability by calculating the minimum pixel value within the RGB channels in a predetermined peripheral range for each pixel of interest and by correcting contrast using an image (minimum value image) made up of the pixel with the minimum pixel value. Further, in Japanese Patent Laid-Open No. 2015-103167, in view of such a problem that there is a case where the correction of the blue light scattered by the Rayleigh scattering is insufficient with the technique of U.S. Pat. No. 8,340,461 described above, the technique to remove the scattered component within a captured image by taking into consideration the difference in characteristics between the two kinds of scattering is disclosed.

In the above-described techniques described in U.S. Pat. No. 8,340,461 and Japanese Patent Laid-Open No. 2015-103167, at the time of performing image processing to remove the scattered component, an arithmetic operation with reference to the minimum pixel value of a captured image is performed. Here, the captured image of a monitoring camera or a digital camera is obtained by an image sensor. The image obtained by an image sensor tends to be affected more largely by sensor noise for lower pixel values and the variation in the pixel value tends to become large. Because of this, with the previously described method of performing image processing based on the minimum value image, there is a possibility that noise becomes more conspicuous on the contrary due to the influence of the lower pixel values included in the minimum value image.

SUMMARY OF THE INVENTION

An object of the present invention is to obtain an image with higher image quality in which the influence of noise caused by an image sensor is suppressed in image processing to improve visual recognizability of a captured image by reducing the influence of fine particles in the atmosphere.

The image processing apparatus according to the present invention is an image processing apparatus that generates an image from a captured image, in which an influence of fine particles in the atmosphere has been reduced, and includes: an atmospheric light component extraction unit configured to extract an atmospheric light component from the captured image; a generation unit configured to generate a scattered component enhanced image in which a scattered light component due to the fine particles is enhanced compared to the captured image by using the extracted atmospheric light component; a correction processing unit configured to perform correction processing to remove the scattered light component due to the fine particles for the captured image based on the scattered component enhanced image; an extraction unit configured to extract a luminance change component and a color change component due to the scattered light by using an image from which the scattered light component has been removed by the correction processing; and a combination unit configured to combine the luminance change component and the color change component that are extracted with the image from which the scattered light component has been removed in an arbitrary ratio, and a pixel value of each pixel making up the scattered component enhanced image is determined based on lower pixel values except for the minimum pixel value within a predetermined block with a pixel of interest as a center in the captured image.

Further features of the present invention will become apparent from the following description of exemplary embodiments (with reference to the attached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing an example of a configuration of an image processing apparatus;

FIG. 2 is a function block diagram of the image processing apparatus;

FIG. 3 is a diagram showing an internal configuration of a haze removal processing unit;

FIG. 4 is a flowchart showing a flow of processing in the haze removal processing unit;

FIG. 5 is a flowchart showing details of extraction processing of an atmospheric light component;

FIG. 6 is a diagram showing an example of an input image obtained by photographing a scene in which fog occurs;

FIGS. 7A and 7B are diagrams explaining a generation process of a scattered component enhanced image;

FIG. 8 is a flowchart showing details of correction processing to remove all scattered components from an input image based on a scattered component enhanced image for all RGB;

FIG. 9 is a flowchart showing details of correction processing to remove all scattered components from an input image based on a scattered component enhanced image for each plane;

FIG. 10 is an example of an image showing a component corresponding to Mie scattering extracted from an input image;

FIG. 11 is an example of an image showing a component corresponding to Rayleigh scattering extracted form an input image; and

FIG. 12 is a diagram showing an example of an image (output image) after haze removal processing.

DESCRIPTION OF THE EMBODIMENTS

Hereinafter, with reference to the attached drawings, the present invention is explained in detail in accordance with preferred embodiments. Configurations shown in the following embodiments are merely exemplary and the present invention is not limited to the configurations shown schematically.

First Embodiment [Outline]

In the present embodiment, first, a Mie-scattered component and a Rayleigh-scattered component in an input image obtained by photographing a scene in which fog or the like occurs are found. Then, an image in which the influence of fine particles has been reduced is obtained by individually suppressing the Mie-scattered component and the Rayleigh-scattered component that are found and recombining both the components. More specifically, the procedure is as follows.

First, from a captured image in the RGB color space, which is an input image, a scattered component of light due to the atmosphere (atmospheric light component) is estimated. Next, an image (scattered component enhanced image) in which the scattered light component in the input image is enhanced is found for each plane of RGB and for all RGB. Next, by using the scattered component enhanced image for each plane and the scattered component enhanced image for all RGB that are found, respectively, correction processing to remove the scattered component is performed for the input image. Then, by using the correction results, the above-described two kinds of scattered component are extracted. Finally, by recombining the Mie-scattered component and the Rayleigh-scattered component that are extracted in an arbitrary ratio, an image whose visual recognizability has been improved is obtained.

It is necessary to pay attention to that the Mie-scattered component and the Rayleigh-scattered component that are found by the above-described extraction or the arithmetic operation in the recombination processing in the present specification do not represent the Mie scattering and the Rayleigh scattering in the physical meaning in a strict and accurate manner. In the present specification, the Mie scattering mainly corresponds to the luminance change component by scattering and the Rayleigh scattering mainly corresponds to the color change component by scattering.

FIG. 1 is a block diagram showing an example of a configuration of an image processing apparatus according to the present invention. An image processing apparatus 100 includes a CPU 101, a RAM 102, a ROM 103, an HDD I/F 104, an HDD 105, an input I/F 106, an output I/F 107, and a system bus 108 and to the image processing apparatus 100, an external memory 109, a display 110, and an image capturing device 111 are connected.

The CPU 101 executes programs stored in the ROM 103 by using the RAM 102 as a work memory and centralizedly controls each unit, to be described later, via the system bus 108. Due to this, various kinds of processing, to be described later, are performed.

The HDD I/F 104 is an interface, for example, such as a serial ATA (SATA), and is connected with the HDD 105 as a secondary storage device. Data is read from the HDD 105 and data is written to the HDD 105 via this HDD I/F 104. The secondary storage device may be a storage device, such as an optical disk drive, other than the HDD.

The input I/F 106 is a serial bus interface, for example, such as USB and IEEE 1394. Via this input I/F 106, data is acquired from the image capturing device 111, the external memory 109 (e.g., hard disc, memory card, CF card, SD card, USB memory), etc.

The output I/F 107 is a video output interface, for example, such as DVI and HDMI (registered trademark). Via this output I/F 107, an image or the like captured by the image capturing device 111 is displayed on the display 110 (various output device, such as liquid crystal display).

The image capturing device 111 acquires digital data of a captured image by receiving light information on a subject by a sensor and performing A/D conversion.

There exist components of the image processing apparatus 100 other than those described above, but they are not the main purpose of the present invention, and therefore, explanation is omitted.

FIG. 2 is a function block diagram of the image processing apparatus 100 according to the present embodiment and the image processing apparatus 100 includes an input image data acquisition unit 201, a haze removal processing unit 202, a haze removed image data output unit 203, and a data storage unit 204. The image processing apparatus 100 implements the function of each unit described above by loading a control program stored within the ROM 103 onto the CPU 101 and executing the control program. An outline of each unit is as follows.

The input image data acquisition unit 201 acquires an image in the RGB color space captured by the image capturing device 111 as an input image. The haze removal processing unit 202 generates an image (hereinafter, called “haze removed image”) from the input image, whose visual recognizability has been improved by removing the scattered component of light due to fine particles in the atmosphere. The haze removed image data output unit 203 performs processing to output the data of the generated haze removed image to the outside, such as the display 110. The data storage unit 204 stores various kinds of data, such as processing results, generated in a generation process of the haze removed image, as well as storing the above-described various kinds of image data.

Subsequently, the haze removal processing unit 202 that is a feature of the present invention is explained in detail. FIG. 3 is a diagram showing an internal configuration of the haze removal processing unit 202. The haze removal processing unit 202 includes an atmospheric light component extraction unit 301, a scattered component enhanced image generation unit 302, a first correction processing unit 303, a second correction processing unit 304, a Mie-scattered component extraction unit 305, a Rayleigh-scattered component extraction unit 306, and a combination processing unit 307.

Each unit described above making up the haze removal processing unit 202 is implemented by the CPU 101 developing a program held in the ROM 103 or the HDD 105 onto the RAM 102 and executing the program. FIG. 4 is a flowchart showing a flow of processing in the haze removal processing unit 202. In the following, in accordance with the flowchart in FIG. 4, the operation of the haze removal processing unit 202 is explained.

At step 401, the atmospheric light component extraction unit 301 extracts the atmospheric light component from an input image. The atmospheric light component means the component other than reflected light from an object in a captured image scene and includes the above-described Mie-scattered component and Rayleigh-scattered component. Details of atmospheric light component extraction processing will be described later. Data of the extracted atmospheric light component is saved in the data storage unit 204 for processing at the subsequent steps.

At step 402, the scattered component enhanced image generation unit 302 generates the above-described scattered component enhanced image from the input image. The value of the pixel making up the scattered component enhanced image are determined based on a plurality of lower pixel values except for the minimum pixel value within a predetermined block, for example, by calculating a weighted average and so forth. Then, the two kinds of scattered component enhanced image are generated, one for each plane and the other for all the RGB planes. By not using the minimum pixel value within the predetermined block at the time of the generation, a pixel having been affected largely by sensor noise is prevented from occurring. Details of scattered component enhanced image generation processing will be described later. Data of the generated two kinds of scattered component enhanced image is saved in the data storage unit 204 for processing at the subsequent steps.

At step 403, the first correction processing unit 303 performs correction processing (first correction processing) to remove the atmospheric light component corresponding to all the scattered light components from the input image by using the scattered component enhanced image for all RGB. Details of the first correction processing will be described later. Data of a corrected image (first corrected image) generated by the first correction processing is saved in the data storage unit 204 for processing at the subsequent steps.

At step 404, the second correction processing unit 304 performs correction processing (second correction processing) to remove the atmospheric light component corresponding to all the scattered light components from the input image by using the scattered component enhanced image for each plane. Details of the second correction processing will be described later. Data of a corrected image (second corrected image) generated by the second correction processing is saved in the storage unit 204 for processing at the subsequent steps.

At step 405, the Mie-scattered component extraction unit 305 extracts the Mie-scattered component by using the input image and the scattered component enhanced image for all RGB. Details of Mie-scattered component extraction processing will be described later. Data of the extracted Mie-scattered component is saved in the data storage unit 204 for processing at the subsequent steps.

At step 406, the Rayleigh-scattered component extraction unit 306 extracts the Rayleigh-scattered component by using the input image and the scattered component enhanced image for each plane. Details of Rayleigh-scattered component extraction processing will be described later. Data of the extracted Rayleigh-scattered component is saved in the data storage unit 204 for processing at the subsequent steps.

At step 407, the combination processing unit 307 performs combination processing to combine the Mie-scattered component and the Rayleigh-scattered component that are extracted in an arbitrary ratio into the above-described second corrected image. The combination processing is performed for each plane (details thereof will be described later). The combined image generated for each plane by the combination processing is integrated into one plane and after being saved in the data storage unit 204, is output to the outside as a haze removed image in accordance with the necessity.

The above is the flow of the processing in the haze removal processing unit 202. Subsequently, details of processing in each unit making up the haze removal processing unit 202 are explained.

[Extraction of Atmospheric Light Component]

The extraction processing (step 401) of the atmospheric light component in the atmospheric light component extraction unit 301 is explained with reference to the flowchart in FIG. 5.

At step 501, image data in the RGB color space, which is an input image, is read from the data storage unit 204. At step 502 that follows, processing to convert the read image in the RGB color space into an image (Y image) representing a luminance value is performed. For this conversion, it may be possible to apply a common RGB-Y color conversion expression.

At step 503, by using the Y image obtained at step 502, a candidate (hereinafter, reference pixel position candidate) of a pixel position that is referred to at the time of estimating the atmospheric light component is determined. Specifically, the position of a pixel having a value greater than or equal to a predetermined threshold value of all the pixel values of the Y image is determined to be a reference pixel position candidate. It is sufficient to set a value as the predetermined threshold value, for example, with which 1% of all the pixel values from the greatest pixel value become eligible for a reference pixel position candidate.

At step 504, the pixel position that is referred to at the time of estimating the atmospheric light component is determined based on the reference pixel position candidate. Specifically, the actual reference pixel position is determined by using the robust estimation, such as the RANSAC method, for the reference pixel position candidates determined at step 503. It is desirable for the pixel to be selected as the atmospheric light component to be a pixel representing the portion of the sky. The purpose of this step is to exclude a high luminous pixel of the portion other than the sky, which is included in the reference pixel position candidate determined at step 503. Regarding this point, the percentage accounted for by the high luminous portion other than the sky on the input image is small and the luminance tends to differ from the color of the sky. Because of this, the robust estimation is performed, which can appropriately narrow down the reference pixels, by handling the pixel whose luminance is different of the pixels of the reference pixel position candidates as an outlier so as not to include the pixel as the reference pixel. At this time, it may also be possible to limit the number of pixels that are determined to be a reference pixel. The reason is to avoid the situation in which referring to too many pixels will result in that the sky including the change in color such as this becomes an estimation target because there is a case where the same sky has different colors (pixel values), for example, such as a case where the color of the sky is represented by gradation on the input image.

At step 505, processing to determine one pixel (reference pixel of interest) that is taken to be a target of the processing to estimate the atmospheric light component in accordance with the reference pixel position determined at step 504 and to add the pixel value of the reference pixel of interest for each color of RGB is performed. It may be possible to determine the reference pixel of interest by, for example, specifying the pixel whose pixel position is the uppermost top-left within the input image of the pixels determined to be the reference pixel as the first reference pixel of interest and then sequentially specifying the pixel on the right side (in the case where there is no pixel on the right side, then, the pixel in the next row) and so forth. The pixel value added for each color of RGB is held in the RAM 102 or the like.

At step 506, whether or not the addition processing has been completed for all the reference pixel positions determined at step 504 is determined. In the case where there is a reference pixel position for which the addition processing has not been performed yet, the processing returns to step 505 and the addition processing is continued by taking the pixel located at the next reference pixel position to be the reference pixel of interest. On the other hand, in the case where the addition processing has been completed for all the reference pixel positions, the processing proceeds to step 507.

At step 507, processing to average the accumulated added pixel values held in the RAM 102 or the like and to extract the atmospheric light component within the input image is performed. Specifically, by using expression (1) and expression (2) below, an atmospheric light component A_(RGB) of an RGB image and an atmospheric light component A_(Y) of a Y image are found, respectively.

A _(RGB)=(ΣA _(R) /n,ΣA _(G) /n,ΣA _(B) n)  expression (1)

A _(Y)=(3×ΣA _(R) /n+6×ΣA _(G) /n+ΣA _(B) /n)/10   expression (2)

In expression (1) and expression (2) described above, A_(R), A_(G), and A_(B) are values representing the atmospheric light component of the R plane, the G plane, and the B plane, respectively, A_(Y) is a value representing the atmospheric light component of the Y image, and n represents the total number of reference pixels. The expression to find the atmospheric light component is not limited to expression (1) or expression (2) described above. For example, it may also be possible to obtain the atmospheric light component of the Y image by finding the minimum value of ΣA_(R)/n, ΣA_(G)/n, and ΣA_(B)/n.

As described above, the two kinds of atmospheric light component, i.e., A_(RGB) and A_(Y), within the input image are extracted in the atmospheric light component extraction unit 301. FIG. 6 is an example of an input image obtained by photographing a scene in which fog occurs and the atmospheric light component A_(RGB) that is found from the input image (RGB image) such as this will be, for example, a value of (176, 177, 179).

[Generation of Scattered Component Enhanced Image]

The generation processing (step 402) of two kinds of scattered component enhanced image in the scattered component enhanced image generation unit 302 is explained with reference to FIGS. 7A and 7B. As described previously, the scattered component enhanced image includes two kinds of scattered component enhanced image: a scattered component enhanced image generated for each plane of RGB and a scattered component enhanced image for all RGB.

First, generation of a scattered component enhanced image for each plane is explained. FIG. 7A is a diagram explaining a generation process of a scattered component enhanced image for each plane. FIG. 7A is part of an arbitrary plane of an RGB image and a thick frame square 700 indicates a reference area corresponding to the predetermined block described previously. In this example, a center pixel 701 is taken to be a pixel of interest and an area (area of 3×3 pixels) consisting of nine pixels in total including the pixel of interest and eight pixels adjacent to the pixel of interest is taken to be a reference area, and a lower pixel value T_(plane) corresponding to the pixel of interest 701 is derived. Here, it is possible to find the lower pixel value T_(plane) in the pixel of interest 701 by, for example, calculating a weighted average of three lowest pixel values except for the minimum pixel value within the reference area 700. In this case, by taking the second lowest pixel value to be V_2, the third lowest pixel value to be V_3, and the fourth lowest pixel value to be V_4, and corresponding weight coefficients to be 2, 4, and 2, the lower pixel value T_(plane) is expressed by expression (3) below.

T _(plane)=(2×V_2+4×V_3+2×_V4)/8   expression (3)

In the example in FIG. 7A, in the case where a weighted average of the three lower pixel values (right of the pixel of interest 701: 104, above the pixel of interest 701: 105, top-left of the pixel of interest 701: 105) except for the minimum pixel value “103” within the reference area 700 is found, the lower pixel value T_(plane)=104.75 is obtained. By performing the processing such as this for all the pixels of the target plane, the scattered component enhanced image for each plane is obtained. In this manner, by calculating the weighted average of a plurality of lower pixel values except for the minimum pixel value, the scattered component enhanced image for each plane is prevented from becoming one having been affected strongly by sensor noise. Then, the pixel that is used to derive the pixel value of the scattered component enhanced image is employed only from the plane of each color, and therefore, the scattered component enhanced image will be one that takes into consideration the influence of the wavelength of the scattering of light. Expression (3) described above is an example of the calculation expression at the time of finding the lower pixel value T_(plane) corresponding to the pixel of interest and the calculation expression is not limited to this. For example, it may also be possible to find a weighted average of four or more lower pixel values except for the minimum value. Besides this, it may also be possible to convert the RGB value into the luminance value and then to find the lower pixel value in the luminance value after the conversion. Further, it may also be possible to find the lower pixel value by referring to a larger area by taking, for example, an area of 5×5 pixels with the pixel of interest as a center as a reference area corresponding to the predetermined block. At the time of determining the size of a reference area, it is considered to, for example, convert the RGB value into the luminance value and to increase the reference range for the larger luminance value. However, it is necessary to distinguish between the portion whose distance to a subject is short and the portion whose distance to a subject is long and there is a possibility that a white wall located near is determined erroneously to be the sky in the case where the reference area is wide, and therefore, it is necessary to determine the reference range by taking into consideration the point such as this.

Next, the generation processing of a scattered component enhanced image for all RGB is explained. FIG. 7B is a diagram explaining a generation process of a scattered component enhanced image for all RGB. In FIG. 7B, part (same coordinates) of each plane of RGB is shown and each of thick frame squares 710, 720, and 730 indicates a reference area corresponding to the predetermined block. In the generation of the scattered component enhanced image for all RGB, each of center pixels 711, 721, and 731 having the same coordinates in three reference areas is taken to be the pixel of interest and the whole of the area including 27 pixels in total including adjacent eight pixels of each pixel of interest is taken to be a reference area. That is, for the scattered component enhanced image for all RGB, different from that for the scattered component enhanced image for each plane, the processing is performed by taking the pixels in all the planes, which are located around the three pixels of interest with the same coordinates, to be the reference area. Because of this, there is a possibility that the pixel that is employed is selected from among the pixels of all the RGB planes. In this manner, a lower pixel value T_(RGB) corresponding to the pixels of interest 711, 721, and 731 with the same coordinates is derived. The lower pixel value T_(RGB) at this time can also be found by expression (3) described above like the above-described lower pixel value T_(plane). In the example in FIG. 7B, in the case where the weighted average of the three lower pixel values (above the pixel of interest 711: 93, top-right of the pixel of interest 721: 96, right of the pixel of interest 711: 97) except for the minimum pixel value “89” is found, the lower pixel value T_(RGB)=95.5 is obtained. In this manner, it is possible to obtain the scattered component enhanced image for all RGB. The scattered component enhanced image for all RGB corresponds to the dark channel image (see paragraph [0022] of Japanese Patent Laid-Open No. 2015-103167) in Japanese Patent Laid-Open No. 2015-103167.

[Generation of Corrected Image Based on Scattered Component Enhanced Image for all RGB]

The correction processing (first correction processing: step 403) to remove all the scattered components from the input image based on the scattered component enhanced image for all RGB in the first correction processing unit 303 is explained with reference to the flowchart in FIG. 8.

At step 801, each piece of the data of the scattered component enhanced image for all RGB, the atmospheric light component of the Y image, and the input image is read from the data storage unit 204.

At step 802, by using the atmospheric light component A_(Y) of the Y image, the scattered component enhanced image for all RGB is corrected. Specifically, by using expression (4) below, a corrected scattered component enhanced image for all RGB RGB_A_(Y) is found.

RGB_A _(Y)(x,y)=T _(in) _(_) _(RGB)(x,y)/A _(Y)  expression (4)

In expression (4) described above, T_(in) _(_) _(RGB) indicates the scattered component enhanced image for all the RGB before the correction and (x, y) is the coordinates indicating the pixel position.

At step 803, a transmittance distribution t_(RGB) (x, y) is derived based on the scattered component enhanced image for all RGB RGB_A_(Y) after the correction by the atmospheric light component A_(Y). Specifically, by applying expression (5) below to RGB_A_(Y), t_(RGB) (x, y) is found.

t _(RGB)(x,y)=1.0−ω(RGB_A _(Y)(x,y))   expression (5)

In expression (5) described above, w is a coefficient for adjustment provided to avoid the pixel value after the scattered component removal from becoming “0” because the transmittance becomes “0” in the case where the transmitted light of a target pixel is made up of only the light scattered by fine particles, such as fog, and the value of ω is, for example, 0.9.

At step 804, the derived transmittance distribution t_(RGB) (x, y) is shaped in accordance with the input image. This is processing to match the transmittance distribution t_(RGB) y) derived at step 803 with the shape of a subject, such as a structure, included in the scene of the input image. Specifically, the shape of a subject is separated by using, for example, the edge keep filter described in “K. He, J. Sun, and X. Tang. Guided image filtering. In ECCV '10: European Conference on Computer Vision, pages 1-14, 2010.”

At step 805, by using the atmospheric light component A_(Y) of the Y image and the transmittance distribution t_(RGB) (x, y) after the shaping, processing to remove all the scattered components is performed for an input image I. Specifically, by using expression (6) below, an image (hereinafter, first corrected image) J_(RGB) from which the scattered components have been removed is found.

$\begin{matrix} {{J_{RGB}\left( {x,y} \right)} = {\frac{\left( {{I\left( {x,y} \right)} - A_{Y}} \right)}{\max \left( {t_{0},{t_{RGB}\left( {x,y} \right)}} \right)} + A_{Y}}} & {{expression}\mspace{14mu} (6)} \end{matrix}$

In expression (6) described above, J_(RGB) (x, y) indicates the pixel value at a pixel position (x, y) of the first corrected image and I (x, y) indicates the pixel value at the pixel position (x, y) of the input image I. Further, t₀ is a coefficient for adjustment provided to prevent the value of J_(RGB) (x, y) from fluctuating considerably due to a slight difference in I (x, y) (shot noise or the like at the time of image capturing) in the case where the transmittance distribution t_(RGB) (x, y) after the shaping is an infinitesimally small value. Specifically, the value of t₀ is, for example, 0.1.

In this manner, the corrected image obtained by removing the scattered components from the input image is generated based on the scattered component enhanced image for all RGB.

[Generation of Corrected Image Based on Scattered Component Enhanced Image for Each Plane]

The correction processing (second correction processing: step 405) to remove all the scattered components from an input image based on the scattered component enhanced image for each plane in the second correction processing unit 305 is explained with reference to the flowchart in FIG. 9.

At step 901, each piece of the data of the scattered component enhanced image for each plane, the atmospheric light component of the RGB image, and the input image is read from the data storage unit 204.

At step 902, by using the atmospheric light component A_(RGB) of the RGB image, the scattered component enhanced image of each plane is corrected. Specifically, by using expression (7) below, a corrected scattered component enhanced image for each plane Plane_A_(RGB) is found.

Plane_A(x,y,c)=T _(in) _(_) _(plane)(x,y,c)/A _(RGB)   expression (7)

In expression (7) described above, T_(in) _(_) _(plane) indicates the scattered component enhanced image for each plane before the correction and (x, y, c) is coordinates indicating the pixel position in a color plane c. In this case, the value of c and each plane are associated with each other in such a manner that c=1 is associated with an R image, c=2 with a G image, and c=3 with a B image.

At step 903, based on the scattered component enhanced image for each plane Plane_A_(RGB) after the correction by the atmospheric light component A_(RGB), a transmittance distribution t_(plane) (x, y, c) is derived. Specifically, by applying expression (8) below to Plane_A_(RGB), t_(plane) (x, c) is found.

t _(plane)(x,y,c)=1.0−ω(Plane_A _(RGB)(x,y,c))   expression (8)

In expression (8) described above, as in expression (5) described previously, ω is a coefficient for adjustment provided to avoid the pixel value after the scattered component removal from becoming “0” and the value of ω is, for example, 0.9.

At step 904, the derived transmittance distribution t_(plane) (x, y, c) is shaped in accordance with the input image. The specific procedure is the same as that at step 804 described previously. In the case of the scattered component enhanced image for each plane, shaping to separate the shape of a subject is performed for each plane, i.e., shaping is performed by changing c in the transmittance distribution t_(plane) (x, y, c).

At step 905, by using the atmospheric light component A_(RGB) of the RGB image and the transmittance distribution t_(plane) (x, y, c) after the shaping, processing to remove all the scattered components is performed for the input image I. Specifically, by using expression (9) below, an image (hereinafter, second corrected image) t_(plane) from which the scattered components have been removed is found.

$\begin{matrix} {{J_{plane}\left( {x,y,c} \right)} = {\frac{\left( {{I\left( {x,y,c} \right)} - A_{RGB}} \right)}{\max \left( {t_{0},{t_{plane}\left( {x,y,c} \right)}} \right)} + A_{RGB}}} & {{expression}\mspace{14mu} (9)} \end{matrix}$

In expression (9) described above, J_(plane) (x, y, c) indicates the pixel value at the pixel position (x, y, c) of the second corrected image and I (x, y, c) indicates the pixel value at the pixel position (x, y, c) of the input image I. Further, t₀ is an adjustment coefficient as in expression (6) described above, and the value of t₀ is, for example, 0.1.

In this manner, based on the scattered component enhanced image for each plane, the corrected image obtained by removing the scattered components from the input image is generated for each plane.

[Extraction of Mie-Scattered Component]

The extraction processing (step 405) of the Mie-scattered component in the Mie-scattered component extraction unit 305 is explained. The Mie-scattered component is the luminance change component by scattered light and corresponds to that obtained by removing the first corrected image J_(RGB) described above from the input image I. Specifically, it is possible to find a Mie-scattered component M by performing subtraction of the pixel value for each plane of each of RGB by using expression (10) and then finding the maximum value in each plane by using expression (11) and integrating them into one plane.

In the case where I(x,y,c)−J _(RGB)(x,y)≧0:M(x,y,c)=I(x,y,c)−J _(RGB)(x,y)

In the case where I(x,y,c)−J _(RGB)(x,y)<0:M(x,y,c)=0  expression (10)

M(x,y)=max(M(x,y,c))  expression (11)

The meanings of (x, y, c) and (x, y) in expression (10) and expression (11) described above are the same as those in expression (6) and expression (7) described previously. FIG. 10 is an image representing the component M corresponding to the Mie scattering obtained from the input image in FIG. 6. In this manner, the Mie-scattered component is extracted from the input image.

It may also be possible to use expression (10)′ below in place of expression (10) described above.

In the case where I(x,y,c)−J _(plane)(x,y,c)≧0:M(x,y,c)=I(x,y,c)−J _(plane)(x,y,c)

In the case where I(x,y,c)−J _(plane)(x,y,c)<0:M(x,y,c)=0  expression(10)′

[Extraction of Rayleigh-Scattered Component]

The extraction processing (step 406) of the Rayleigh-scattered component in the Rayleigh-scattered component extraction unit 306 is explained. The Rayleigh-scattered component is the color change component by scattered light and corresponds to that obtained by removing the second corrected image J_(plane) and the Mie-scattered component M described above from the input image I. Consequently, it is possible to find a Rayleigh-scattered component R by performing subtraction of the pixel value by using expression (12) below for each pixel of the input image I.

In the case where I(x,y,c)−J _(plane)(x,y,c)−M(x,y)≧0:R(x,y,c)=I(x,y,c)−J _(plane)(x,y,c)−M(x,y)

In the case where I(x,y,c)−J _(plane)(x,y,c)−M(x,y)<0:R(x,y,c)=0  expression (12)

The meanings of (x, y, c) and (x, y) in expression (12) described above are the same as those in expression (6) and expression (7) described previously. FIG. 11 is an image representing the component corresponding to the Rayleigh scattering obtained from the input image in FIG. 6. In this manner, the Rayleigh-scattered component is extracted from the input image.

[Combination Processing]

Finally, processing to recombine the Mie-scattered component and the Rayleigh-scattered component that are extracted with the second corrected image generated for each plane in an arbitrary ratio in the combination processing unit 307 is explained. Specifically, a combined image J_(comb) is found by performing addition of the pixel value by using expression (13) below for each pixel of the second corrected image J_(plane).

J _(comb)(x,y,c)=J _(plane)(x,y,c)+m·M(x,y)+r·R(x,y,c)  expression (13)

In expression (13) described above, m is an intensity coefficient by which the Mie-scattered component is multiplied and r is an intensity coefficient by which the Rayleigh-scattered component is multiplied and it is desirable for r and m to take a value between 0 and 1, respectively, for example, r=0.5 and m=0.1. Further, by setting m=0 and r=0, it is possible to obtain an image specialized only in improvement of contrast and which does not take coloring into consideration. Further, by putting r close to 1, there is a tendency for the coloring after the processing to decrease and by putting m close to 1, there is a tendency for the removal intensity of fog to decrease and for the contrast to decrease. In this manner, by performing image combination while arbitrarily changing the values of m and r, it is possible to control the degree of the influence by scattering of light.

Then, by integrating the combined image J_(comb) for each plane which is found into one, the final output image (haze removed image) is obtained. FIG. 12 shows the output image obtained by performing the above-described combination processing for the input image in FIG. 6. It is a little bit difficult to grasp from FIG. 12, but it is known that the image becomes more natural because of removal of scattered components caused by fine particles in the atmosphere.

As explained above, according to the present invention, it is made possible to obtain an image of high image quality whose visual recognizability has been improved by increasing the contrast reduced by the influence of fine particles in the atmosphere in a more natural form.

Other Embodiments

Embodiment(s) of the present invention can also be realized by a computer of a system or apparatus that reads out and executes computer executable instructions (e.g., one or more programs) recorded on a storage medium (which may also be referred to more fully as a ‘non-transitory computer-readable storage medium’) to perform the functions of one or more of the above-described embodiment(s) and/or that includes one or more circuits (e.g., application specific integrated circuit (ASIC)) for performing the functions of one or more of the above-described embodiment(s), and by a method performed by the computer of the system or apparatus by, for example, reading out and executing the computer executable instructions from the storage medium to perform the functions of one or more of the above-described embodiment(s) and/or controlling the one or more circuits to perform the functions of one or more of the above-described embodiment(s). The computer may comprise one or more processors (e.g., central processing unit (CPU), micro processing unit (MPU)) and may include a network of separate computers or separate processors to read out and execute the computer executable instructions. The computer executable instructions may be provided to the computer, for example, from a network or the storage medium. The storage medium may include, for example, one or more of a hard disk, a random-access memory (RAM), a read only memory (ROM), a storage of distributed computing systems, an optical disk (such as a compact disc (CD), digital versatile disc (DVD), or Blu-ray Disc (BD)™), a flash memory device, a memory card, and the like.

According to the present invention, it is possible to obtain an image of higher image quality in which the influence of noise caused by an image sensor is suppressed in the image processing to improve visual recognizability of a captured image by reducing the influence of fine particles in the atmosphere.

While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.

This application claims the benefit of Japanese Patent Application No. 2016-009136, filed Jan. 20, 2016, which is hereby incorporated by reference wherein in its entirety. 

What is claimed is:
 1. An image processing apparatus that generates an image from a captured image, in which an influence of fine particles in the atmosphere has been reduced, the image processing apparatus comprising: an atmospheric light component extraction unit configured to extract an atmospheric light component from the captured image; a generation unit configured to generate a scattered component enhanced image in which a scattered light component due to the fine particles is enhanced compared to the captured image by using the extracted atmospheric light component; a correction processing unit configured to perform correction processing to remove the scattered light component due to the fine particles for the captured image based on the scattered component enhanced image; an extraction unit configured to extract a luminance change component and a color change component due to the scattered light by using an image from which the scattered light component has been removed by the correction processing; and a combination unit configured to combine the luminance change component and the color change component that are extracted with the image from which the scattered light component has been removed in an arbitrary ratio, wherein a pixel value of each pixel making up the scattered component enhanced image is determined based on lower pixel values except for the minimum pixel value within a predetermined block with a pixel of interest as a center in the captured image.
 2. The image processing apparatus according to claim 1, wherein a pixel value of each pixel making up the scattered component enhanced image is determined by calculating a weighted average of a plurality of lower pixel values except for the minimum pixel value within the predetermined block.
 3. The image processing apparatus according to claim 2, wherein the weighted average is calculated by using three or more lower pixel values except for the minimum pixel value within the predetermined block.
 4. The image processing apparatus according to claim 1, wherein the captured image has each pixel value in an RGB color space, and a pixel value of each pixel making up the scattered component enhanced image is determined based on a luminance value converted from an RGB value within the predetermined block.
 5. The image processing apparatus according to claim 1, wherein the captured image has each pixel value in an RGB color space, and the image processing apparatus further comprises a unit configured to set the predetermined block size in accordance with a luminance value converted from an RGB value so that the greater the luminance value, the larger the block size becomes.
 6. The image processing apparatus according to claim 1, wherein the generation unit generates the scattered component enhanced images for each plane of RGB and for all RGB, the correction processing unit generates two kinds of image from which the scattered light component has been removed by performing the correction processing by using the scattered component enhanced image generated for each plane of RGB and the scattered component enhanced image generated for all RGB, respectively; and the extraction unit extracts the luminance change component and the color change component, respectively, by using the two kinds of image from which the scattered light component has been removed and the captured image.
 7. The image processing apparatus according to claim 1, wherein in the combination, for each pixel of the image from which the scattered light component has been removed, processing to add values obtained by multiplying the extracted luminance change component and the extracted color change component by a predetermined coefficient is performed.
 8. The image processing apparatus according to claim 7, wherein the combination unit performs the combination for each plane of RGB and integrates a combined image obtained for each plane into one image and outputs the image.
 9. An image processing method of generating an image from a captured image, in which an influence of fine particles in the atmosphere has been reduced, the method comprising the steps of: extracting an atmospheric light component from the captured image: generating a scattered component enhanced image in which a scattered light component due to the fine particles is enhanced compared to the captured image by using the extracted atmospheric light component; performing correction processing to remove the scattered light component due to the fine particles for the captured image based on the scattered component enhanced image; extracting a luminance change component and a color change component due to the scattered light by using an image from which the scattered light component has been removed by the correction processing; and combining the luminance change component and the color change component that are extracted with the image from which the scattered light component has been removed in an arbitrary ratio, wherein a pixel value of each pixel making up the scattered component enhanced image is determined based on lower pixel values except for the minimum pixel value within a predetermined block with a pixel of interest as a center in the captured image.
 10. A non-transitory computer readable storage medium storing a program for causing a computer to perform an image processing method of generating an image from a captured image, in which an influence of fine particles in the atmosphere has been reduced, the method comprising the steps of: extracting an atmospheric light component from the captured image: generating a scattered component enhanced image in which a scattered light component due to the fine particles is enhanced compared to the captured image by using the extracted atmospheric light component; performing correction processing to remove the scattered light component due to the fine particles for the captured image based on the scattered component enhanced image; extracting a luminance change component and a color change component due to the scattered light by using an image from which the scattered light component has been removed by the correction processing; and combining the luminance change component and the color change component that are extracted with the image from which the scattered light component has been removed in an arbitrary ratio, wherein a pixel value of each pixel making up the scattered component enhanced image is determined based on lower pixel values except for the minimum pixel value within a predetermined block with a pixel of interest as a center in the captured image. 